package com.rwb.springboot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by ruwenbo on 2018/4/17.
 */
@Controller
public class JSONRestController {

    @RequestMapping("/json/user")
    @ResponseBody
    public User getUser() {
        User user = new User();

        user.setName("ruwenbo");
        user.setAge(25);

        return user;
    }
}
